home *** CD-ROM | disk | FTP | other *** search
- VERSION 4.00
- Begin VB.Form Server
- BorderStyle = 4 'Fixed ToolWindow
- Caption = "FTP Server"
- ClientHeight = 3510
- ClientLeft = 1860
- ClientTop = 1890
- ClientWidth = 5370
- Height = 3915
- Icon = "Server.frx":0000
- Left = 1800
- LinkTopic = "Form1"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 3510
- ScaleWidth = 5370
- ShowInTaskbar = 0 'False
- Top = 1545
- Width = 5490
- Begin VB.PictureBox picFrame
- Appearance = 0 'Flat
- BorderStyle = 0 'None
- ForeColor = &H80000008&
- Height = 1575
- Left = 285
- ScaleHeight = 1575
- ScaleWidth = 4800
- TabIndex = 14
- Top = 1200
- Width = 4800
- Begin VB.TextBox txtServer
- Height = 285
- Index = 3
- Left = 1155
- PasswordChar = "*"
- TabIndex = 10
- Top = 1125
- Width = 3540
- End
- Begin VB.TextBox txtServer
- Height = 285
- Index = 2
- Left = 1155
- TabIndex = 8
- Top = 765
- Width = 3540
- End
- Begin VB.TextBox txtServer
- Height = 285
- Index = 1
- Left = 1155
- TabIndex = 6
- Top = 405
- Width = 3540
- End
- Begin VB.TextBox txtServer
- Height = 285
- Index = 0
- Left = 1155
- TabIndex = 4
- Top = 45
- Width = 3540
- End
- Begin VB.Label lblGeneric
- Caption = "&Password:"
- Height = 195
- Index = 6
- Left = 15
- TabIndex = 9
- Top = 1155
- Width = 1080
- End
- Begin VB.Label lblGeneric
- Caption = "&Login Name:"
- Height = 195
- Index = 5
- Left = 15
- TabIndex = 7
- Top = 795
- Width = 1080
- End
- Begin VB.Label lblGeneric
- Caption = "Host &Address:"
- Height = 195
- Index = 4
- Left = 15
- TabIndex = 5
- Top = 435
- Width = 1080
- End
- Begin VB.Label lblGeneric
- BackStyle = 0 'Transparent
- Caption = "Host &Name:"
- Height = 195
- Index = 1
- Left = 15
- TabIndex = 3
- Top = 60
- Width = 1110
- End
- End
- Begin VB.TextBox txtAlias
- Height = 285
- Left = 690
- MaxLength = 40
- TabIndex = 1
- Top = 150
- Width = 4425
- End
- Begin VB.CommandButton cmdCancel
- Cancel = -1 'True
- Caption = "Cancel"
- Height = 375
- Left = 4155
- TabIndex = 12
- Top = 3030
- Width = 1125
- End
- Begin VB.CommandButton cmdOK
- Caption = "OK"
- Default = -1 'True
- Enabled = 0 'False
- Height = 375
- Left = 2970
- TabIndex = 11
- Top = 3030
- Width = 1125
- End
- Begin VB.Label lblReadMe
- Caption = "A simple set of information about a FTP server. Expand as needed."
- ForeColor = &H00800000&
- Height = 465
- Left = 120
- TabIndex = 13
- Top = 3030
- Visible = 0 'False
- Width = 2700
- End
- Begin VB.Label lblGeneric
- Caption = "Alia&s:"
- Height = 195
- Index = 0
- Left = 150
- TabIndex = 0
- Top = 180
- Width = 465
- End
- Begin ComctlLib.TabStrip tabServer
- Height = 2190
- Left = 105
- TabIndex = 2
- TabStop = 0 'False
- Top = 705
- Width = 5175
- _Version = 65536
- _ExtentX = 9128
- _ExtentY = 3863
- _StockProps = 68
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- Name = "MS Sans Serif"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ImageList = ""
- i1 = "Server.frx":014A
- End
- Attribute VB_Name = "Server"
- Attribute VB_Creatable = False
- Attribute VB_Exposed = False
- Option Explicit
- '----------------------------------------------------
- '<Purpose> Enables adding, and maintaing FTP Servers.
- ' Can be easily made into an OLE server.
- '----------------------------------------------------
- '<Constant>------------------------------------------
- Const svrHostName As Integer = 0
- Const svrHostAddress As Integer = 1
- Const svrLoginName As Integer = 2
- Const svrPassword As Integer = 3
- '</Constant>-----------------------------------------
- '<Public>--------------------------------------------
- Public PressedOK As Boolean
- Public ThisServer As FTPServer
- Public Mode As Integer
- Public MyCaption As String
- '</Public>-------------------------------------------
- Private Sub cmdCancel_Click()
- PressedOK = False
- Unload Me
- End Sub
- Private Sub cmdOK_Click()
- '---- if in add mode, create a new class object
- If (Mode = ciAdd) Then
- Set ThisServer = New FTPServer
- End If
- '---- save the information about the host
- With ThisServer
- .Alias = txtAlias
- .HostName = txtServer(svrHostName)
- .HostAddress = txtServer(svrHostAddress)
- .LoginName = txtServer(svrLoginName)
- .Password = txtServer(svrPassword)
- End With
-
- PressedOK = True
- Unload Me
- End Sub
- Private Sub Form_Load()
- If (MyCaption <> "") Then
- Me.Caption = MyCaption
- End If
- If (Mode = ciProperties) Then
- '---- display the host information
- With ThisServer
- txtAlias = .Alias
- txtServer(svrHostName) = .HostName
- txtServer(svrHostAddress) = .HostAddress
- txtServer(svrLoginName) = .LoginName
- txtServer(svrPassword) = .Password
- End With
- End If
- Call GetWindowState(Me, "ciFTPServerWindow", False)
- End Sub
- Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
- If (Not (UnloadMode = vbFormCode)) Then
- PressedOK = False
- End If
- Call SetWindowState(Me, "ciFTPServerWindow")
- End Sub
- Private Sub Form_Terminate()
- '---- explicitly clean up all objects
- Set ThisServer = Nothing
- End Sub
- Private Sub txtAlias_Change()
- cmdOK.Enabled = (txtAlias <> "")
- End Sub
- Private Sub txtAlias_GotFocus()
- Call SelectText(txtAlias)
- End Sub
- Private Sub txtServer_GotFocus(Index As Integer)
- Call SelectText(txtServer(Index))
- End Sub
-